﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/UserArea.master" AutoEventWireup="true" CodeBehind="Reserve.aspx.cs" Inherits="UserInterfaceLayer.User.Reserve" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headUser" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentUser" runat="server">
    <div style="width: 1000px; margin: 10px auto auto auto; border: 1px solid black;" class="font_medium">
        <div class="header_a">رزرو اتاق</div>
        <div id="Room" class="bgcolor_f2 border_black" style="margin: 20px; padding: 5px;">
            <label for="contentSite_contentUser_ddlReferer">معرف</label>
            <asp:DropDownList ID="ddlReferer" runat="server" CssClass="font_medium textbox" />
            <hr />
            <asp:Panel ID="pnlSearchRoom" runat="server" DefaultButton="btnSearchRoom">
                <label for="contentSite_contentUser_ddlFrom">از</label>
                <asp:DropDownList ID="ddlFrom" runat="server" CssClass="font_medium"></asp:DropDownList>
                <label for="contentSite_contentUser_ddlTo">تا</label>
                <asp:DropDownList ID="ddlTo" runat="server" CssClass="font_medium"></asp:DropDownList>
                <asp:Button ID="btnSearchRoom" runat="server" Text="" CssClass="button_search_32" OnClick="btnSearchRoom_Click" PostBackUrl="#Room" />
            </asp:Panel>
            <hr />
            <asp:ListView ID="lstRoom" runat="server">
                <AlternatingItemTemplate>
                    <tr style="background-color: #F0F0F0; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnAddRoom" runat="server" ToolTip='<%# Eval("dRoom.RoomID")%>' OnClick="btnAddRoom_Click" CssClass="button_add_32" PostBackUrl="#Room" />
                        </td>
                        <td>
                            <a href='<%# "Room.aspx?RoomID=" + Eval("dRoom.RoomID")%>'><%# Eval("dRoom.Name")%></a>
                        </td>
                        <td><%# Eval("bRoom.Status")%></td>
                        <td><%# Eval("dRoom.Description")%></td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <div class="font_medium messagebox1_failure">
                        <span class="failure_16 messagebox1_item_icon_16"></span>
                        <span>هیچ اتاقی در دسترس نیست.</span>
                    </div>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <tr style="background-color: #FFFFFF; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnAddRoom" runat="server" ToolTip='<%# Eval("dRoom.RoomID")%>' OnClick="btnAddRoom_Click" CssClass="button_add_32" PostBackUrl="#Room" />
                        </td>
                        <td>
                            <a href='<%# "Room.aspx?RoomID=" + Eval("dRoom.RoomID")%>'><%# Eval("dRoom.Name")%></a>
                        </td>
                        <td><%# Eval("bRoom.Status")%></td>
                        <td><%# Eval("dRoom.Description")%></td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Tahoma; width: 100%;">
                        <tr runat="server" style="background-color: #000000; color: #FFFFFF; height: 50px;">
                            <th runat="server"></th>
                            <th runat="server">نام اتاق</th>
                            <th runat="server">وضعیت</th>
                            <th runat="server">توضیحات</th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
            <hr />
            <asp:ListView ID="lstSelectedRoom" runat="server">
                <AlternatingItemTemplate>
                    <tr style="background-color: #F0F0F0; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnDeleteRoom" runat="server" ToolTip='<%# Eval("dRoom.RoomID")%>' OnClick="btnDeleteRoom_Click" CssClass="button_remove_32" PostBackUrl="#Room" />
                        </td>
                        <td>
                            <a href='<%# "Room.aspx?RoomID=" + Eval("dRoom.RoomID")%>'><%# Eval("dRoom.Name")%></a>
                        </td>
                        <td><%# Eval("bRoom.Status")%></td>
                        <td><%# Eval("dRoom.Description")%></td>
                        <td><%# Eval("Room.hijriFrom")%></td>
                        <td><%# Eval("Room.hijriTo")%></td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <div class="font_medium messagebox1_failure">
                        <span class="failure_16 messagebox1_item_icon_16"></span>
                        <span>هیچ اتاقی انتخاب نشده است.</span>
                    </div>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <tr style="background-color: #FFFFFF; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnDeleteRoom" runat="server" ToolTip='<%# Eval("dRoom.RoomID")%>' OnClick="btnDeleteRoom_Click" CssClass="button_remove_32" PostBackUrl="#Room" />
                        </td>
                        <td>
                            <a href='<%# "Room.aspx?RoomID=" + Eval("dRoom.RoomID")%>'><%# Eval("dRoom.Name")%></a>
                        </td>
                        <td><%# Eval("bRoom.Status")%></td>
                        <td><%# Eval("dRoom.Description")%></td>
                        <td><%# Eval("Room.hijriFrom")%></td>
                        <td><%# Eval("Room.hijriTo")%></td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Tahoma; width: 100%;">
                        <tr runat="server" style="background-color: #000000; color: #FFFFFF; height: 50px;">
                            <th runat="server"></th>
                            <th runat="server">نام اتاق</th>
                            <th runat="server">وضعیت</th>
                            <th runat="server">توضیحات</th>
                            <th runat="server">از</th>
                            <th runat="server">تا</th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
        </div>
        <div id="Person" class="bgcolor_f2 border_black" style="margin: 20px; padding: 5px;">
            <asp:Panel ID="pnlSearchPerson1" runat="server" DefaultButton="btnSearchPerson">
                <label for="contentSite_contentUser_txtNationalNumber">شماره ملی</label>
                <asp:TextBox ID="txtNationalNumber" runat="server" Style="width: 120px;" CssClass="font_medium ltr text_indent"></asp:TextBox>
                <label for="contentSite_contentUser_txtFirstName">نام</label>
                <asp:TextBox ID="txtFirstName" runat="server" Style="width: 120px;" CssClass="font_medium text_indent"></asp:TextBox>
                <label for="contentSite_contentUser_txtLastName">نام خانوادگی</label>
                <asp:TextBox ID="txtLastName" runat="server" Style="width: 120px;" CssClass="font_medium text_indent"></asp:TextBox>
                <asp:Button ID="btnSearchPerson" runat="server" Text="" CssClass="button_search_32" OnClick="btnSearchPerson_Click" PostBackUrl="#Person" />
            </asp:Panel>
            <hr />
            <asp:ListView ID="lstPerson" runat="server">
                <AlternatingItemTemplate>
                    <tr style="background-color: #F0F0F0; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnAddPerson" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnAddPerson_Click" CssClass="button_add_32" PostBackUrl="#Person" />
                        </td>
                        <td>
                            <a href='<%# "Person.aspx?PersonID=" + Eval("dPerson.PersonID")%>'><%# Eval("dPerson.NationalNumber")%></a>
                        </td>
                        <td><%# Eval("dPerson.FirstName")%></td>
                        <td><%# Eval("dPerson.LastName")%></td>
                        <td><%# Eval("dPerson.FatherName")%></td>
                        <td><%# Eval("dPerson.IdentityNumber")%></td>
                        <td><%# Eval("dPerson.Description")%></td>
                        <td><%# Eval("bPerson.Image")%></td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <div class="font_medium messagebox1_failure">
                        <span class="failure_16 messagebox1_item_icon_16"></span>
                        <span>هیچ شخصی در دسترس نیست.</span>
                    </div>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <tr style="background-color: #FFFFFF; text-align: center;">
                        <td style="width: 48px;">
                            <asp:Button ID="btnAddPerson" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnAddPerson_Click" CssClass="button_add_32" PostBackUrl="#Person" />
                        </td>
                        <td>
                            <a href='<%# "Person.aspx?PersonID=" + Eval("dPerson.PersonID")%>'><%# Eval("dPerson.NationalNumber")%></a>
                        </td>
                        <td><%# Eval("dPerson.FirstName")%></td>
                        <td><%# Eval("dPerson.LastName")%></td>
                        <td><%# Eval("dPerson.FatherName")%></td>
                        <td><%# Eval("dPerson.IdentityNumber")%></td>
                        <td><%# Eval("dPerson.Description")%></td>
                        <td><%# Eval("bPerson.Image")%></td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Tahoma; width: 100%;">
                        <tr runat="server" style="background-color: #000000; color: #FFFFFF; height: 50px;">
                            <th runat="server"></th>
                            <th runat="server">کد ملی</th>
                            <th runat="server">نام</th>
                            <th runat="server">نام خانوادگی</th>
                            <th runat="server">نام پدر</th>
                            <th runat="server">شماره شناسنامه</th>
                            <th runat="server">توضیحات</th>
                            <th runat="server">عکس</th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
            <hr />
            <asp:ListView ID="lstSelectedPerson" runat="server">
                <AlternatingItemTemplate>
                    <tr style="background-color: #F0F0F0; text-align: center;">
                        <td>
                            <asp:Button ID="btnDeletePerson" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnDeletePerson_Click" CssClass="button_remove_32" PostBackUrl="#Person"/>
                        </td>
                        <td>
                            <asp:Button ID="btnHeadman" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnHeadman_Click" CssClass='<%# (bool)Eval("Headman") ? "radio_on_32" : "radio_off_32" %> ' PostBackUrl="#Person"/>
                        </td>
                        <td>
                            <a href='<%# "Person.aspx?PersonID=" + Eval("dPerson.PersonID")%>'><%# Eval("dPerson.NationalNumber")%></a>
                        </td>
                        <td><%# Eval("dPerson.FirstName")%></td>
                        <td><%# Eval("dPerson.LastName")%></td>
                        <td><%# Eval("dPerson.FatherName")%></td>
                        <td><%# Eval("dPerson.IdentityNumber")%></td>
                        <td><%# Eval("dPerson.Description")%></td>
                        <td><%# Eval("bPerson.Image")%></td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <div class="font_medium messagebox1_failure">
                        <span class="failure_16 messagebox1_item_icon_16"></span>
                        <span>هیچ شخصی انتخاب نشده است.</span>
                    </div>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <tr style="background-color: #FFFFFF; text-align: center;">
                        <td>
                            <asp:Button ID="btnDeletePerson" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnDeletePerson_Click" CssClass="button_remove_32" PostBackUrl="#Person"/>
                        </td>
                        <td>
                            <asp:Button ID="btnHeadman" runat="server" ToolTip='<%# Eval("dPerson.PersonID")%>' OnClick="btnHeadman_Click" CssClass='<%# (bool)Eval("Headman") ? "radio_on_32" : "radio_off_32"%> ' PostBackUrl="#Person"/>
                        </td>
                        <td>
                            <a href='<%# "Person.aspx?PersonID=" + Eval("dPerson.PersonID")%>'><%# Eval("dPerson.NationalNumber")%></a>
                        </td>
                        <td><%# Eval("dPerson.FirstName")%></td>
                        <td><%# Eval("dPerson.LastName")%></td>
                        <td><%# Eval("dPerson.FatherName")%></td>
                        <td><%# Eval("dPerson.IdentityNumber")%></td>
                        <td><%# Eval("dPerson.Description")%></td>
                        <td><%# Eval("bPerson.Image")%></td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF; border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px; font-family: Tahoma; width: 100%;">
                        <tr runat="server" style="background-color: #000000; color: #FFFFFF; height: 50px;">
                            <th runat="server" style="width: 48px;"></th>
                            <th runat="server" style="width: 48px;"></th>
                            <th runat="server">کد ملی</th>
                            <th runat="server">نام</th>
                            <th runat="server">نام خانوادگی</th>
                            <th runat="server">نام پدر</th>
                            <th runat="server">شماره شناسنامه</th>
                            <th runat="server">توضیحات</th>
                            <th runat="server">عکس</th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
        </div>
        <div class="messagebox1_holder">
            <div runat="server" id="lblSuccessful">
                <div class="messagebox1_successful">
                    <span class="successful_16 messagebox1_item_icon_16"></span>
                    <span>با موفقیت رزرو شد.</span>
                </div>
            </div>
            <div runat="server" id="lblFailure">
                <div class="messagebox1_failure">
                    <span class="failure_16 messagebox1_item_icon_16"></span>
                    <span>خطای ناشناختهای در سیستم رخ داده است. با پشتیبانی تماس بگیرید.</span>
                </div>
            </div>
            <div runat="server" id="lblNoRoomSelected">
                <div class="messagebox1_failure">
                    <span class="failure_16 messagebox1_item_icon_16"></span>
                    <span>هیچ اتاقی انتخاب نشده است.</span>
                </div>
            </div>
            <div runat="server" id="lblNoPersonSelected">
                <div class="messagebox1_failure">
                    <span class="failure_16 messagebox1_item_icon_16"></span>
                    <span>هیچ شخصی انتخاب نشده است.</span>
                </div>
            </div>
            <div runat="server" id="lblNoHeadmanSelected">
                <div class="messagebox1_failure">
                    <span class="failure_16 messagebox1_item_icon_16"></span>
                    <span>سرپرست انتخاب نشده است.</span>
                </div>
            </div>
            <div runat="server" id="lblInvalidInput">
                <div class="messagebox1_failure">
                    <span class="failure_16 messagebox1_item_icon_16"></span>
                    <span>مشخصات وارد شده معتبر نیست. لطفا تصحیح نمایید.</span>
                </div>
            </div>
        </div>
        <hr />
        <div style="margin: 20px;" class="ltr">
            <asp:Button ID="btnReserve" runat="server" Text="" CssClass="button_save_48" OnClick="btnReserve_Click" />
        </div>
    </div>
</asp:Content>
